package cn.szabadsag.hrm.client;

import cn.szabadsag.hrm.domain.LoginUser;
import cn.szabadsag.hrm.dto.LoginUserDto;
import cn.szabadsag.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author yangcong
 * @date 2022年04月05日 13:52
 * @since
 */
@FeignClient(value = "hrm-auth",fallbackFactory = AuthServiceClientFallBackFactory.class)
public interface AuthServiceClient {

    //不要写公共前缀，因为其它controller也有可能暴露服务
    @PutMapping("/loginUser/userMeals")
    AjaxResult add(@RequestBody LoginUserDto loginUserDto);

    @PutMapping("/loginUser/uptPassword")
    AjaxResult uptByUsername(@RequestBody LoginUser loginUser);
}
